package com.ygs.secs.mapper;

import com.ygs.secs.model.Student;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface StudentMapper {
    /**
     * delete by primary key
     *
     * @param stuid primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String stuid);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(Student record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(Student record);

    /**
     * select by primary key
     *
     * @param stuid primary key
     * @return object by primary key
     */
    Student selectByPrimaryKey(String stuid);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Student record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Student record);

    int updateBatch(List<Student> list);

    int updateBatchSelective(List<Student> list);

    int batchInsert(@Param("list") List<Student> list);

    int batchDelete(@Param("array") String[] students);

    Student getstudetailinfo(String stuid);

    List<Student> getStudentByAttributes(Student record);

    int checkpwd(@Param("stuid") String stuid, @Param("newpwd") String newpwd);
}